import { createSSRApp } from 'vue';

export function createApp() {
  return createSSRApp({
    data: () => ({ count: 1 }),
    template: `<div @click="increment" style="color: red;">{{ count }}
        <div v-for="(item,index) in count">{{item}}</div>
    </div>`,
    methods: {
      increment() {
        this.count++;
      },
    },
    mounted () {
      console.log(this.count, 111);
    },
    watch: {
      count(val) {
        console.log(val, 222);
      },
    },
  });
}
